/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.contacts.v3.model;

import com.google.api.client.util.Key;

/**
 * This element describe another entity (usually a person) that is in a relation
 * of some kind with the contact.
 * 
 * @author Nicolas Garnier
 */
public class Relation {

  /** Used to specify that the Relation is an assistant. */
  public static final String TYPE_ASSISTANT = "assistant";

  /** Used to specify that the Relation is a brother. */
  public static final String TYPE_BROTHER = "brother";

  /** Used to specify that the Relation is a child. */
  public static final String TYPE_CHILD = "child";

  /** Used to specify that the Relation is a domestic partner. */
  public static final String TYPE_DOMESTIC_PARTNER = "domestic-partner";

  /** Used to specify that the Relation is a father. */
  public static final String TYPE_FATHER = "father";

  /** Used to specify that the Relation is a friend. */
  public static final String TYPE_FRIEND = "friend";

  /** Used to specify that the Relation is a manager. */
  public static final String TYPE_MANAGER = "manager";

  /** Used to specify that the Relation is a mother. */
  public static final String TYPE_MOTHER = "mother";

  /** Used to specify that the Relation is a parent */
  public static final String TYPE_PARENT = "parent";

  /** Used to specify that the Relation is a partner. */
  public static final String TYPE_PARTNER = "partner";

  /** Used to specify that the Relation is a reference. */
  public static final String TYPE_REFERRED_BY = "referred-by";

  /** Used to specify that the Relation is a relative. */
  public static final String TYPE_RELATIVE = "relative";

  /** Used to specify that the Relation is a sister. */
  public static final String TYPE_SISTER = "sister";

  /** Used to specify that the Relation is a spouse. */
  public static final String TYPE_SPOUSE = "spouse";

  /**
   * A programmatic value that identifies the type of relation. Valid values are
   * {@link #TYPE_ASSISTANT}, {@link #TYPE_BROTHER}, {@link #TYPE_CHILD},
   * {@link #TYPE_DOMESTIC_PARTNER}, {@link #TYPE_FATHER}, {@link #TYPE_FRIEND},
   * {@link #TYPE_MANAGER}, {@link #TYPE_MOTHER}, {@link #TYPE_PARENT},
   * {@link #TYPE_PARTNER}, {@link #TYPE_REFERRED_BY}, {@link #TYPE_RELATIVE},
   * {@link #TYPE_SISTER} and {@link #TYPE_SPOUSE}.
   */
  @Key("@rel")
  public String type;

  /**
   * A simple string value used to name this relation. The value must not be
   * empty or all whitespace.
   */
  @Key("@label")
  public String label;

  /** The entity in relation with the contact. */
  @Key("text()")
  public String name;
}
